<template>
	<view>
		<view class="banner">
			<image class="ban-img"
				:src="imgprefix + '/web/uploads/diamonds/' + detail.shapeId + '.png?timeout='+timeout" mode=""></image>
		</view>
		<view class="goods-explain" :class="getTheme + '-m-back ' + getTheme">
			假一赔四，定金实体店可退，实体店体验，百年双熙堂品牌
		</view>
		<view class="bridetail">
			<view class="bd-code">
				编码:{{detail.barCode}}
			</view>
			<view class="dir-left-wrap main-between">
				<text>颜色：{{detail.colorName}}</text>
				<text>重量：{{detail.priStoneWeight}}</text>
				<text>形状：{{detail.shapeName}}</text>
				<text>净度：{{detail.clearityName}}</text>
				<text>切工：{{detail.cutName}}</text>
				<text>抛光：{{detail.polishName}}</text>
				<text>对称：{{detail.symmetryName}}</text>
			</view>
		</view>
		<view class="bridetail dir-left-wrap main-between">
			<view class="">
				价格：￥{{detail.salePrice}}
			</view>
			<view class="">
				市场价：￥{{detail.marketPrice}}
			</view>
		</view>
		<!-- 查询钻石 -->
		<view class="goods-margin">
			<image class="zsjt" :src="imgprefix + '/web/uploads/logo/ring2.png?timeout='+timeout" mode="widthFix">
			</image>
		</view>
		<!-- 裸钻定制 查询戒托 -->
		<view class="goods-margin" @click="searchjt">
			<image class="zsjt" :src="imgprefix + '/web/uploads/logo/ringjt.png?timeout='+timeout" mode="widthFix">
			</image>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				detail: null,
				imgprefix: this.$siteInfo.imgroot,
				timeout: new Date().getTime(),
			}
		},
		onLoad(options) {
			// console.log(options);
			if (options.id) {
				this.loadpara(options.id)
			}
		},
		methods: {
			// 查询戒托
			searchjt() {
				uni.navigateTo({
					url: '/plugins/diamonds/ring'
				})
			},
			loadpara(id) {
				let prams = {
					tid: id
				}
				this.$request({
					url: this.$api.goods.zspara,
					data: {
						params: JSON.stringify(prams)
					}
				}).then(res => {
					// console.log(res);
					this.detail = res.detail
					// console.log(this.detail);
					// this.listpara = res.data
				});
			},
		}
	}
</script>

<style scoped lang="scss">
	.banner {
		width: 750rpx;
		height: 750rpx;

		.ban-img {
			width: 750rpx;
			height: 750rpx;
		}
	}

	.goods-explain {
		width: 100%;
		height: 60rpx;
		line-height: 60rpx;
		background-color: #ff4544;
		color: #FFFFFF;
		font-size: 24rpx;
		font-weight: 600;
		padding: 0 24rpx;
		text-align-last: justify;
	}

	.bridetail {
		color: #8b542f;
		padding: 24rpx 32rpx;
		background: #FFF;
		font-size: 26rpx;

		text {
			padding: 0 24rpx;
		}
	}

	.bd-code {
		padding: 12rpx 0;
	}

	.goods-margin {
		margin: 20upx 0;
	}

	.zsjt {
		width: 100%;
		margin: 0 auto;
	}
</style>
